<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
%><%@ taglib prefix="tags" tagdir="/WEB-INF/tags"
%><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"
%><%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"
%><%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"
%><%@ taglib prefix="spring" uri="http://www.springframework.org/tags"
%><%@ taglib prefix="tags" tagdir="/WEB-INF/tags"
%><%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
%><head>
	<title><fmt:message key="address" /></title>
</head>
<body>
	<c:choose>
		<c:when test="${addressCount == 0}">
			<fmt:message key="crud.search.empty.result" />
		</c:when>
		<c:otherwise>
			<table class="list">
				<col/>
				<col class="odd"/>
				<thead>
					<tr>
						<th>
							<tags:sort-header model="address" attribute="streetName" url="list"/>
						</th>
						<th>
							<tags:sort-header model="address" attribute="city" url="list"/>
						</th>
						<th>&nbsp;</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${addresses}" var="address" varStatus="status">
						<tr${(status.index % 2) == 0 ? "" : " class=\"odd\""}>
							<td>
								<spring:eval expression="address.streetName"/>
							</td>
							<td>
								<spring:eval expression="address.city"/>
							</td>
							<td>
								<nobr>
									<tags:a href="/domain/address/show/${address.primaryKey}" cssClass="ajaxLink" icon="ok"/>
									<tags:a href="/domain/address/update/${address.primaryKey}" cssClass="ajaxLink" icon="edit"/>
									<tags:a href="/domain/address/delete/${address.primaryKey}" cssClass="ajaxModal" icon="delete"/>
								</nobr>
							</td>
						</tr>
					</c:forEach>
				</tbody>
			<tfoot>
				<tr>
					<th colspan="3">
						<tags:navigation totalSize="${addressesCount}" search="${searchParameters}"/>
					</th>
				</tr>
			</tfoot>
		</table>
	</c:otherwise>
</c:choose>
</body>